-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MdeModulePkg: CodeQL Fixes. #6266
base: master
Are you sure you want to change the base?
Conversation
Includes changes across the repo for the following CodeQL rules: - cpp/comparison-with-wider-type - cpp/overflow-buffer - cpp/redundant-null-check-param - cpp/uselesstest Co-authored-by: Taylor Beebe <tabeebe@microsoft.com> Co-authored-by: pohanch <125842322+pohanch@users.noreply.github.com> Co-authored-by: kenlautner <85201046+kenlautner@users.noreply.github.com> Co-authored-by: Oliver Smith-Denny <osde@linux.microsoft.com> Co-authored-by: Sean Brogan <sean.brogan@microsoft.com> Co-authored-by: Aaron Pop <105021049+apop5@users.noreply.github.com> Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
// | ||
// Don't display hidden boot options, but retain inactive ones. | ||
// | ||
if ((BootOption[Index].Attributes & LOAD_OPTION_HIDDEN) != 0) { |
Check failure
Code scanning / CodeQL
Returned pointer not checked High
} | ||
} | ||
} | ||
|
||
CurrentStatement->StorageWidth = (UINT16)sizeof (EFI_HII_REF); | ||
InitializeRequestElement (FormSet, CurrentStatement, CurrentForm); |
Check failure
Code scanning / CodeQL
Returned pointer not checked High
CurrentStatement->StorageWidth = (UINT16)sizeof (UINT64); | ||
Value->Type = EFI_IFR_TYPE_NUM_SIZE_64; | ||
break; | ||
InitializeRequestElement (FormSet, CurrentStatement, CurrentForm); |
Check failure
Code scanning / CodeQL
Returned pointer not checked High
|
||
InitializeRequestElement (FormSet, CurrentStatement, CurrentForm); | ||
InitializeRequestElement (FormSet, CurrentStatement, CurrentForm); |
Check failure
Code scanning / CodeQL
Returned pointer not checked High
CurrentStatement->BufferValue = AllocateZeroPool (CurrentStatement->StorageWidth + sizeof (CHAR16)); | ||
CurrentStatement->HiiValue.Value.string = NewString ((CHAR16 *)CurrentStatement->BufferValue, FormSet->HiiHandle); | ||
|
||
InitializeRequestElement (FormSet, CurrentStatement, CurrentForm); |
Check failure
Code scanning / CodeQL
Returned pointer not checked High
CurrentStatement->BufferValue = AllocateZeroPool ((CurrentStatement->StorageWidth + sizeof (CHAR16))); | ||
CurrentStatement->HiiValue.Value.string = NewString ((CHAR16 *)CurrentStatement->BufferValue, FormSet->HiiHandle); | ||
|
||
InitializeRequestElement (FormSet, CurrentStatement, CurrentForm); |
Check failure
Code scanning / CodeQL
Returned pointer not checked High
// | ||
CurrentStatement->Storage = NULL; | ||
CurrentStatement->StorageWidth = 0; | ||
InitializeRequestElement (FormSet, CurrentStatement, CurrentForm); |
Check failure
Code scanning / CodeQL
Returned pointer not checked High
// | ||
CurrentStatement->Storage = NULL; | ||
CurrentStatement->StorageWidth = 0; | ||
InitializeRequestElement (FormSet, CurrentStatement, CurrentForm); |
Check failure
Code scanning / CodeQL
Returned pointer not checked High
Description
Includes changes across the repo for the following CodeQL rules:
cpp/comparison-with-wider-type
cpp/overflow-buffer
cpp/redundant-null-check-param
cpp/uselesstest
Breaking change?
Impacts security?
Includes tests?
How This Was Tested
Shipped in platforms with Project Mu.
Integration Instructions
N/A